* doc.c: Integer and memory overflow fixes.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 28 Jul 2011 21:34:39 +0000 (14:34 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 28 Jul 2011 21:34:39 +0000 (14:34 -0700)
commit926a0de42780d72867ff53b1bb90cb3e84605a9e
tree9034ea70dc4a8f5c10d6ddae5f3a7205fe460b07
parent233ca442302be63930a0a49711042d5607fb591b
* doc.c: Integer and memory overflow fixes.

(get_doc_string_buffer_size): Now ptrdiff_t, not int.
(get_doc_string): Check for size calculation overflow.
Don't update size until allocation succeeds.
(get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
EMACS_INT, where ptrdiff_t will do.
(Fsubstitute_command_keys): Check for string overflow.
src/ChangeLog
src/doc.c